Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit f9605436c4a5326cf26542da487d0d712e1cf02f


Parents : ce25fc0
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-01-01T19:28:58-06:00

fix(build): correct version output handling in workflow to ensure proper version assignment and validation

Changes

1 files changed, 27 insertions(+), 27 deletions(-)


Diff

diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml
index cbb9982b..a6379710 100644
--- a/.gitea/workflows/build.yml
+++ b/.gitea/workflows/build.yml
@@ -33,22 +33,22 @@ jobs:
- name: Determine version
id: version
run: |
- if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.version }}" ]; then
- echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
- elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
- VERSION="${GITHUB_REF#refs/tags/}"
- if [ -z "${VERSION}" ]; then
- VERSION="${{ github.ref_name }}"
- fi
- if [ "${VERSION}" = "master" ] || [ "${VERSION}" = "main" ]; then
- echo "Error: Invalid tag name '${VERSION}'. Tag name cannot be a branch name." >&2
- exit 1
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.version }}" ]; then
+ echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
+ elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
+ VERSION="${GITHUB_REF#refs/tags/}"
+ if [ -z "${VERSION}" ]; then
+ VERSION="${{ github.ref_name }}"
+ fi
+ if [ "${VERSION}" = "master" ] || [ "${VERSION}" = "main" ]; then
+ echo "Error: Invalid tag name '${VERSION}'. Tag name cannot be a branch name." >&2
+ exit 1
+ fi
+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
+ else
+ SHORT_SHA=$(git rev-parse --short HEAD)
+ echo "version=${SHORT_SHA}" >> $GITHUB_OUTPUT
fi
- echo "version=${VERSION}" >> $GITHUB_OUTPUT
- else
- SHORT_SHA=$(git rev-parse --short HEAD)
- echo "version=${SHORT_SHA}" >> $GITHUB_OUTPUT
- fi
- name: Install NodeJS
uses: https://git.quad4.io/actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
@@ -74,7 +74,7 @@ jobs:
- name: Setup Task
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
with:
- version: '3.46.3'
+ version: "3.46.3"
- name: Sync versions
run: python scripts/sync_version.py
@@ -100,7 +100,7 @@ jobs:
# Collect artifacts
find dist -type f \( -name "*-linux*.AppImage" -o -name "*-linux*.deb" \) -exec cp {} release-assets/ \;
find python-dist -type f -name "*.whl" -exec cp {} release-assets/ \;
-
+
# Generate checksums
cd release-assets
echo "## SHA256 Checksums" > release-body.md
@@ -114,16 +114,16 @@ jobs:
- name: Validate version
run: |
- VERSION="${{ steps.version.outputs.version }}"
- if [ -z "${VERSION}" ]; then
- echo "Error: Version is empty" >&2
- exit 1
- fi
- if [ "${VERSION}" = "master" ] || [ "${VERSION}" = "main" ]; then
- echo "Error: Invalid version '${VERSION}'. Version cannot be a branch name." >&2
- exit 1
- fi
- echo "Using version: ${VERSION}"
+ VERSION="${{ steps.version.outputs.version }}"
+ if [ -z "${VERSION}" ]; then
+ echo "Error: Version is empty" >&2
+ exit 1
+ fi
+ if [ "${VERSION}" = "master" ] || [ "${VERSION}" = "main" ]; then
+ echo "Error: Invalid version '${VERSION}'. Version cannot be a branch name." >&2
+ exit 1
+ fi
+ echo "Using version: ${VERSION}"
- name: Create Release
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────